package com.huanuo.internetofthings.service.impact;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.unicorn.framework.base.base.AbstractService;
import org.unicorn.framework.core.SysCode;
import org.unicorn.framework.core.exception.PendingException;

import com.huanuo.internetofthings.bo.impact.ImpactDeviceDetailInfo;
import com.huanuo.internetofthings.dao.impact.ImpactDeviceDetailInfoMapper;

@Service
public class ImpactDeviceDetailInfoService extends AbstractService {

	@Autowired
	private ImpactDeviceDetailInfoMapper impactDeviceDetailInfoMapper;

	/**
	 * 查询设备详细信息
	 * @param impactDeviceDetailInfo
	 * @return
	 * @throws PendingException
	 */
	public ImpactDeviceDetailInfo getImpactDeviceDetailInfoMapper(ImpactDeviceDetailInfo impactDeviceDetailInfo)
			throws PendingException {
		try {
			return impactDeviceDetailInfoMapper.selectOne(impactDeviceDetailInfo);
		} catch (Exception e) {
			error("查询设备详细信息失败", e);
			throw new PendingException(SysCode.DB_ERROR, "查询设备详细信息失败");
		}
	}
	
}